import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Jiang Jinxi
 * Date: 2024-03-27
 * Time: 21:14
 */
class Student{
    public String id;

    public Student(String id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id='" + id + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(id, student.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
public class Test {
    public List<String> topKFrequent(String[] words, int k) {
        Map<String,Integer> map = new HashMap<>();
        for (String s:
             words) {
            if(map.get(s) == null){
                map.put(s,1);
            }else{
                int val = map.get(s);
                map.put(s,val+1);
            }
        }
        PriorityQueue<Map.Entry<String,Integer>> minHeap = new PriorityQueue<>(new Comparator<Map.Entry<String, Integer>>() {
            @Override
            public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {
                if(o1.getValue().compareTo(o2.getValue()) == 0){
                    return o2.getKey().compareTo(o1.getKey());
                }
                return o1.getValue().compareTo(o2.getValue());
            }
        });
        for (Map.Entry<String,Integer> entry: map.entrySet()) {
            if(minHeap.size() < k){
                minHeap.offer(entry);
            }else{
                Map.Entry<String,Integer> top = minHeap.peek();
                if(top.getValue().compareTo(entry.getValue()) < 0){
                    minHeap.poll();
                    minHeap.offer(entry);
                }else if(top.getValue().compareTo(entry.getValue()) == 0){
                    if(top.getKey().compareTo(entry.getKey()) > 0){
                        minHeap.poll();
                        minHeap.offer(entry);
                    }
                }
            }
        }
        List<String> list = new ArrayList<>();
        for (int i = 0; i < k; i++) {
            Map.Entry<String,Integer> top = minHeap.poll();
            list.add(top.getKey());
        }
        Collections.reverse(list);
        return list;
    }
    public static void main(String[] args) {
        Set<Character> set = new HashSet<>();
        Scanner scanner = new Scanner(System.in);
        String s1 = scanner.nextLine().toUpperCase();
        String s2 = scanner.nextLine().toUpperCase();
        for(int i = 0;i<s2.length();i++){
            set.add(s2.charAt(i));
        }
        Set<Character> setBroken = new HashSet<>();
        for (char s: s1.toCharArray()) {
            if(!set.contains(s) && !setBroken.contains(s)){
                System.out.println(s);
                setBroken.add(s);
            }
        }


    }
    public static void main3(String[] args) {
        Student student1 = new Student("123456");
        HashBuck2<Student,Integer> hashBuck2 = new HashBuck2<>();
        hashBuck2.push(student1,123);
        System.out.println(hashBuck2);
    }
    public static void main2(String[] args) {
        Student student1 = new Student("123456");
        int hashCode1 = student1.hashCode();
        Student student2 = new Student("123456");
        int hashCode2 = student1.hashCode();


    }

    public static void main1(String[] args) {
        HashBuck hashBuck = new HashBuck();
        hashBuck.push(3,777);
        hashBuck.push(13,778);
        hashBuck.push(9,777);
        hashBuck.push(7,777);
        hashBuck.push(5,777);
        hashBuck.push(88,777);
        hashBuck.push(46,777);
        hashBuck.push(99,777);
        hashBuck.push(23,777);
        System.out.println(hashBuck.getVal(13));

        System.out.println();
    }
}
